<page-header [autoTitle]="false"></page-header>
<nz-card>
  <section class="search-section">
    <input nz-input placeholder="代理商、代理手机" [(ngModel)]="keyword" class="search-item"/>
    <nz-select [(ngModel)]="financeType" [nzPlaceHolder]="'关联账户'" class="search-item" [nzAllowClear]="true">
      <nz-option
        *ngFor="let option of agentBalanceType"
        [nzLabel]="option.value"
        [nzValue]="option.key">
      </nz-option>
    </nz-select>
    <button nz-button [nzType]="'primary'" nzGhost (click)="search()"  class="search-item">
      <i class="anticon anticon-search"></i><span>搜索</span>
    </button>
  </section>
  <nz-table #nzTable [nzData]="page.content"
            [nzPageSize]="page.size"
            [nzTotal]="page.totalElements"
            [nzFrontPagination]="false"
            [(nzPageIndex)]="page.number"
            (nzPageIndexChange)="changePageNo($event)"
            [nzLoading]="isLoading">
    <thead>
    <tr>
      <th nz-th><span>序号</span></th>
      <th nz-th><span>代理商</span></th>
      <th nz-th><span>代理手机</span></th>
      <th nz-th><span>收货代理商</span></th>
      <th nz-th><span>收货代理商手机</span></th>
      <th nz-th><span>关联账户</span></th>
      <th nz-th><span>金额(￥)</span></th>
      <th nz-th><span>操作时间</span></th>
      <!--<th nz-th><span>操作</span></th>-->
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let data of nzTable.data;let i=index">
      <td>
        {{i+1}}
      </td>
      <td>{{data.agentName}}</td>
      <td>{{data.agentPhone}}</td>
      <td>{{data.chargebackName}}</td>
      <td>{{data.chargebackPhone}}</td>
      <td>{{data.financeType|dicsNamePipe:agentBalanceType}}</td>
      <td>{{data.amount}}</td>
      <td>{{data.doTime}}</td>
    <!--  <td>
        <a href="javascript:void (0);" (click)="editEntity(data)">查看详情</a>
      </td>-->
    </tr>
    </tbody>
  </nz-table>
</nz-card>
